package com.example.communitypro.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class UserReport implements Serializable {
    private Integer reportNo;

    private Integer userNo;

    private Integer reportObjectNo;

    private Integer reportObjectType;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date reportTime;

    private String reportReason;

    private String reportRejection;


    private static final long serialVersionUID = 1L;

    public String getReportReason() {
        return reportReason;
    }

    public void setReportReason(String reportReason) {
        this.reportReason = reportReason;
    }

    public String getReportRejection() {
        return reportRejection;
    }

    public void setReportRejection(String reportRejection) {
        this.reportRejection = reportRejection;
    }

    public Integer getReportNo() {
        return reportNo;
    }

    public void setReportNo(Integer reportNo) {
        this.reportNo = reportNo;
    }

    public Integer getUserNo() {
        return userNo;
    }

    public void setUserNo(Integer userNo) {
        this.userNo = userNo;
    }

    public Integer getReportObjectNo() {
        return reportObjectNo;
    }

    public void setReportObjectNo(Integer reportObjectNo) {
        this.reportObjectNo = reportObjectNo;
    }

    public Integer getReportObjectType() {
        return reportObjectType;
    }

    public void setReportObjectType(Integer reportObjectType) {
        this.reportObjectType = reportObjectType;
    }

    public Date getReportTime() {
        return reportTime;
    }

    public void setReportTime(Date reportTime) {
        this.reportTime = reportTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserReport other = (UserReport) that;
        return (this.getReportNo() == null ? other.getReportNo() == null : this.getReportNo().equals(other.getReportNo()))
                && (this.getUserNo() == null ? other.getUserNo() == null : this.getUserNo().equals(other.getUserNo()))
                && (this.getReportObjectNo() == null ? other.getReportObjectNo() == null : this.getReportObjectNo().equals(other.getReportObjectNo()))
                && (this.getReportObjectType() == null ? other.getReportObjectType() == null : this.getReportObjectType().equals(other.getReportObjectType()))
                && (this.getReportTime() == null ? other.getReportTime() == null : this.getReportTime().equals(other.getReportTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getReportNo() == null) ? 0 : getReportNo().hashCode());
        result = prime * result + ((getUserNo() == null) ? 0 : getUserNo().hashCode());
        result = prime * result + ((getReportObjectNo() == null) ? 0 : getReportObjectNo().hashCode());
        result = prime * result + ((getReportObjectType() == null) ? 0 : getReportObjectType().hashCode());
        result = prime * result + ((getReportTime() == null) ? 0 : getReportTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", reportNo=").append(reportNo);
        sb.append(", userNo=").append(userNo);
        sb.append(", reportObjectNo=").append(reportObjectNo);
        sb.append(", reportObjectType=").append(reportObjectType);
        sb.append(", reportTime=").append(reportTime);
        sb.append(", reportReason=").append(reportReason);
        sb.append(", reportRejection=").append(reportRejection);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}